package com.yinhai.service;

import java.util.List;

import android.content.Context;

import com.yinhai.dao.NoticeNewsDaoImpl;
import com.yinhai.model.NewsContent;
public class NoticeNewsServiceImpl {
	private Context context;
	private NoticeNewsDaoImpl imUserGroupDao;
	public NoticeNewsServiceImpl(Context context) {
		this.context = context;
		imUserGroupDao = new NoticeNewsDaoImpl(context);
	}

	public List<NewsContent> findByList() {
		String sql = "select u.* from notice_model_newcontent u  order by uuid DESC";
		return imUserGroupDao.rawQuery(sql, null);
	}
	
	public void insert(NewsContent u) {
		imUserGroupDao.insert(u);
	}
	
	public void delete(String id) {
		//String sql = "delete from notice_model_newcontent uuid="+id;
		//imUserGroupDao.execSql(sql, null);
		imUserGroupDao.deleteByUUID(id);
	}
	
}
